package com.company.oa.announcement.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.company.oa.announcement.dto.AnnouncementDTO;
import com.company.oa.announcement.entity.Announcement;

import java.util.List;
import java.util.Map;

public interface AnnouncementService extends IService<Announcement> {
    
    IPage<Announcement> getAnnouncementPage(int page, int size, Announcement announcement);
    
    Announcement getAnnouncementDetail(Long id);
    
    boolean createAnnouncement(AnnouncementDTO announcementDTO, Long userId, String userName, Long deptId, String deptName);
    
    boolean updateAnnouncement(AnnouncementDTO announcementDTO);
    
    boolean deleteAnnouncement(Long id);
    
    boolean publishAnnouncement(Long id);
    
    boolean cancelAnnouncement(Long id);
    
    boolean topAnnouncement(Long id, boolean isTop);
    
    List<Announcement> getUserAnnouncements(Long userId, Long departmentId, List<Long> roleIds);
    
    boolean readAnnouncement(Long id, Long userId, String userName, String ip);
    
    Map<String, Object> getAnnouncementStats();
} 